﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Intorise.API;
using System.Threading;

namespace Bot
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //Helper.MouseMoveP(this.Handle, 100, 100);
            //var p = Windows.GetForegroundWindow();
            //var p0 = this.Handle;
            //Helper.MouseMoveP(Windows.GetForegroundWindow(), 505, 198);
            //Thread.Sleep(100);
            Helper.MouseLeftClickP(this.button2.Handle, 5, 5);
            //Helper.MouseLeftClick(1084, 17);
            //Helper.MouseLeftDown(1084, 17);
            //Helper.MouseLeftDown(this.Handle,1084, 17);
        }

        private void Form1_Click(object sender, EventArgs e)
        {
            this.msg.Text = "mouse " + (MouseButtons | MouseButtons.Left) + " click " + MousePosition.X + ":" + MousePosition.Y;
        }

        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            this.msg.Text = "Key press :" + e.KeyChar;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Helper.KeyPressP(this.Handle, Keys.A);
        }
    }
}
